import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);
const routes = [
    {
        path: '',
        redirect: '/index'
    },
    {
        path: '/index',
        name: 'index',
        component: () => import(/* webpackChunkName: "about" */ '../views/index.vue'),
        children: [
            {
                path: '/user',
                name: 'user',
                component: () => import(/* webpackChunkName: "about" */ '@/components/content/user.vue')
            },
            {
                path: '/video',
                name: 'video',
                component: () => import(/* webpackChunkName: "about" */ '@/components/content/video.vue')
            },
            {
                path: '/info',
                name: 'info',
                component: () => import(/* webpackChunkName: "about" */ '@/components/content/info.vue')
            }
        ]
    },
    {
        path: '/login',
        name: 'login',
        component: () => import(/* webpackChunkName: "about" */ '@/views/login.vue')
    }
];

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
});

export default router;
